<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    body {
      height: 7000px;
    }
  </style>
</head>
<body>
    <script>
      window.addEventListener('scroll',function (){
        alert('我滚了')
      })
    </script>
</body>
</html>